package com.example.locationgps;

import android.content.Context;
import android.os.Environment;

import java.io.FileOutputStream;

public class DLog
{


    public static void writeFileSdcard(Context context, String fileName, String message)
    {
        try
        {
            //String path= Environment.getExternalStorageDirectory().toString();
            String path=context.getExternalFilesDir("").toString();


            FileOutputStream fout = new FileOutputStream(path+"/"+fileName,true);
            System.out.println(path+"/"+fileName);
            byte [] bytes = message.getBytes();
            fout.write(bytes);
            fout.close();
        }

        catch(Exception e)
        {
        }
    }

}
